/*
 * @Author: 华芊芊 huaqianqian@yeah.net
 * @Date: 2023-09-20 16:38:13
 * @LastEditors: 华芊芊 huaqianqian@yeah.net
 * @LastEditTime: 2023-10-25 20:53:32
 * @FilePath: \zmglpt-ui-screen\vue.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const path = require('path')
const resolve = dir => {
  return path.join(__dirname, dir)
}
module.exports = {
  lintOnSave: false,
  publicPath: './',
  chainWebpack: config => {
    config.resolve.alias
      .set('_c', resolve('src/components')) // key,value自行定义，比如.set('@@', resolve('src/components'))
  },
  devServer: {
    hot: true,//自动保存
    open: true,//自动启动
    port: 8080,//默认端口号
    host: "0.0.0.0",
    proxy: {
      '/largescreen/sql/result': {
        target: 'http://zmpt.ah.yc',//后端接口地址
        changeOrigin: true,//是否允许跨越
        ws: true,
            pathRewrite: {
                '^/api': '/largescreen/sql/result'//重写,
            }
      }
    }
  }
}